 #define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void  swap_arr(int arr[],int size)
{
	if (arr == NULL || size <= 0) 
	{
		return;
	}
	int left = 0;
	int right = size - 1;
	int temp = 0;
	while (left < right)
	{
		while (left < right &&  arr[left] % 2 == 1)
		{
			left++;
		}
		while (left < right && arr[right] % 2 == 0)
		{
			right--;
		}
		if (left < right)
		{
			temp = arr[left];
			arr[left] = arr[right];
			arr[right] = temp;
		}
	}
	for (int i = 0; i < size; i++)
	{
		printf(" %d ", arr[i]);
	}
}
int main()
{
	int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
	int size = sizeof(arr) / sizeof arr[0];
	swap_arr(arr, size);
	return 0;
}